import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import 'vant/lib/index.css';
import { Button,Row,Col,Icon,Grid,GridItem,Search,Swipe, 
  SwipeItem,Lazyload,Cell,Tabbar,TabbarItem,NavBar,TreeSelect,
  Image,Tabs,Tab,GoodsAction, GoodsActionIcon, GoodsActionButton,
  ActionSheet,Popup,Stepper,Notify,Dialog,Loading,Overlay,SubmitBar,
  Checkbox,List,Field,AddressEdit,Toast,Area,Switch,Picker,CheckboxGroup,Radio,RadioGroup,CellGroup,ContactCard} from 'vant';

Vue.config.productionTip = false
Vue.use(Button)
Vue.use(Row)
Vue.use(Col)
Vue.use(Icon)
Vue.use(Grid);
Vue.use(GridItem);
Vue.use(Search)
Vue.use(Swipe)
Vue.use(SwipeItem)
Vue.use(Lazyload)
Vue.use(Cell)
Vue.use(Tabbar);
Vue.use(TabbarItem)
Vue.use(NavBar)
Vue.use(TreeSelect )
Vue.use(Image)
Vue.use(Tabs)
Vue.use(Tab)
Vue.use(GoodsAction);
Vue.use(GoodsActionButton);
Vue.use(GoodsActionIcon);
Vue.use(ActionSheet)
Vue.use(Popup)
Vue.use(Stepper)
Vue.prototype.$notify = Notify
Vue.prototype.$dialog = Dialog
Vue.use(Loading)
Vue.use(Overlay)
Vue.use(SubmitBar)
Vue.use(Checkbox)
Vue.use(List)
Vue.use(Field)
Vue.use(AddressEdit)
Vue.prototype.$toast = Toast
Vue.use(Area)
Vue.use(Switch)
Vue.use(Picker)
Vue.use(Dialog)
Vue.use(CheckboxGroup)
Vue.use(Radio)
Vue.use(ContactCard)
Vue.use(RadioGroup)
Vue.use(CellGroup)


import Router from 'vue-router'
const routerPush = Router.prototype.push
Router.prototype.push = function push(location) {
  return routerPush.call(this, location).catch(error=> error)
}

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
